local zhuangrong = fk.CreateSkill {
    name = "gai__zhuangrong",
    tags = { Skill.Wake },
  }
  
  Fk:loadTranslationTable{
    ["gai__zhuangrong"] = "妆戎",
    [":gai__zhuangrong"] = "觉醒技，开始或结束阶段，若你的手牌数或体力值为1，你减1点体力上限并将体力值回复至体力上限，"..
    "然后将手牌摸至体力上限，获得技能〖神威〗和〖无双〗。",
  
    ["$gai__zhuangrong1"] = "锋镝鸣手中，锐戟映秋霜。",
    ["$gai__zhuangrong2"] = "红妆非我愿，学武觅封侯。",
  }
  
  zhuangrong:addEffect(fk.EventPhaseStart, {
    can_trigger = function(self, event, target, player, data)
      return target == player and player:hasSkill(zhuangrong.name) and 
        (player.phase == Player.Start or player.phase == Player.Finish) and
        player:usedSkillTimes(zhuangrong.name, Player.HistoryGame) == 0
    end,
    can_wake = function(self, event, target, player, data)
      return player:getHandcardNum() == 1 or player.hp == 1
    end,
    on_use = function(self, event, target, player, data)
      local room = player.room
      room:changeMaxHp(player, -1)
      if player.dead then return end
      if player:isWounded() then
        room:recover{
          who = player,
          num = player.maxHp - player.hp,
          recoverBy = player,
          skillName = zhuangrong.name,
        }
        if player.dead then return end
      end
      local n = player.maxHp - player:getHandcardNum()
      if n > 0 then
        player:drawCards(n, zhuangrong.name)
        if player.dead then return end
      end
      room:handleAddLoseSkills(player, "shenwei|wushuang")
    end,
  })
  
  return zhuangrong